package com.bonjour.work.dto;

import com.bonjour.common.helper.StringHelper;
import com.mysql.cj.util.StringUtils;

public class SearchResumeResult {
    private Long rid;
    private String name;
    private String gender;
    private Integer degree;
    private String birth;
    private Integer experience;
    private String university;
    private String major;
    private String company;
    private String title;
    private Integer salaryFrom;
    private Integer salaryTo;

    public void fortify(){
        if(StringHelper.isBlank(getUniversity()) ){
            this.setUniversity("未知学校");
        }
        if(StringHelper.isBlank(getMajor())  ){
            this.setMajor("未知专业");
        }
        if(StringHelper.isBlank(getTitle())  ){
            this.setTitle("未知职位");
        }
        if(StringHelper.isBlank(getCompany()) ){
            this.setCompany("未知专业");
        }
        if(StringHelper.isBlank((getBirth()))){
            this.setBirth("未知年龄");
        }
        if(StringHelper.isBlank((getName()))){
            this.setBirth("未知名字");
        }
    }
    public Long getRid() {
        return rid;
    }

    public void setRid(Long rid) {
        this.rid = rid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public Integer getDegree() {
        return degree;
    }

    public void setDegree(Integer degree) {
        this.degree = degree;
    }

    public String getBirth() {
        return birth;
    }

    public void setBirth(String birth) {
        this.birth = birth;
    }

    public Integer getExperience() {
        return experience;
    }

    public void setExperience(Integer experience) {
        this.experience = experience;
    }

    public String getUniversity() {
        return university;
    }

    public void setUniversity(String university) {
        this.university = university;
    }

    public String getMajor() {
        return major;
    }

    public void setMajor(String major) {
        this.major = major;
    }

    public String getCompany() {
        return company;
    }

    public void setCompany(String company) {
        this.company = company;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Integer getSalaryFrom() {
        return salaryFrom;
    }

    public void setSalaryFrom(Integer salaryFrom) {
        this.salaryFrom = salaryFrom;
    }

    public Integer getSalaryTo() {
        return salaryTo;
    }

    public void setSalaryTo(Integer salaryTo) {
        this.salaryTo = salaryTo;
    }

    @Override
    public String toString() {
        return "SearchResumeResult{" +
                "rid=" + rid +
                ", name='" + name + '\'' +
                ", gender='" + gender + '\'' +
                ", degree=" + degree +
                ", birth='" + birth + '\'' +
                ", experience=" + experience +
                ", university='" + university + '\'' +
                ", major='" + major + '\'' +
                ", company='" + company + '\'' +
                ", title='" + title + '\'' +
                ", salaryFrom=" + salaryFrom +
                ", salaryTo=" + salaryTo +
                '}';
    }
}
